@extends('app.base')

@section('page_title')
  部落诗友
@endsection

@section('page_header')
  <link rel="stylesheet" href="/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css">
@endsection

@section('content')
  <div class="top-header">
    <h3>部落诗友</h3>
    <span class="go-back"><i class="fa fa-angle-left"></i></span>
  </div>
  <div class="content" style="background-color:#f8f8f8;float:left;width:100%;">
    <div class="card user-card">
      <dl class="dl-horizontal">
        <dt>用户名</dt><dd>{{ $user->name }}</dd>
        <dt>会员积分</dt><dd>{{ $user->score }}</dd>
        <dt>所属部落:</dt><dd>{{ $user->get_luo()?$user->get_luo()->name:'' }}</dd>
        <dt>常住地</dt><dd>{{ get_user_loc($user) }}</dd>
        <dt>联系方式</dt><dd>{{ $user->tel }}</dd>
        <dt>电子邮箱</dt><dd>{{ $user->email }}</dd>
        <dt>职业类别</dt><dd>{{ get_user_job($user) }}</dd>
      </dl>
    </div>
    <div class="card post-card">
      <h4>发表文章</h4>
      <div class="list">
      @if ($posts->count())
        @foreach ($posts as $post)
          <a href="/posts/{{ $post->id }}">
          <div class="post">
            <h5>《{{ $post->title }}》</h5>
            <p>{{ get_text_desc($post->content) }}</p>
          </div>
          </a>
        @endforeach
      @else
        <p>这里空空如也...</p>
      @endif
      </div>
    </div>
  </div>
@endsection
